package com.tjec.framework.web.domain;

import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.tjec.project.businessWorkbench.domain.BmsBusinessTask;
import com.tjec.project.businessWorkbench.domain.BmsProjectDocCatalog;
import com.tjec.project.system.domain.BmsMdBusinessCategory;
import com.tjec.project.system.domain.SysDept;
import com.tjec.project.system.domain.SysMenu;

/**
 * Treeselect树结构实体类
 * 
 * @author pangyognfeng
 */
public class TreeSelectExport implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private String guid;

    /** 节点名称 */
    private String label;
    
    /** 顺序 **/
    private double sort;
    
    /** 顺序 **/
    private String businessId;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeSelectExport> children;

    public TreeSelectExport()
    {

    }
    
    public TreeSelectExport(BmsProjectDocCatalog bmsProjectDocCatalog)
    {
        this.label = bmsProjectDocCatalog.getName();
        this.sort = bmsProjectDocCatalog.getSort();
        this.children = bmsProjectDocCatalog.getChildren().stream().map(TreeSelectExport::new).collect(Collectors.toList());
        this.businessId = bmsProjectDocCatalog.getBusinessId();
    }
    
    public TreeSelectExport(BmsBusinessTask bmsBusinessTask)
    {
        this.label = bmsBusinessTask.getName();
        this.children = bmsBusinessTask.getChildren().stream().map(TreeSelectExport::new).collect(Collectors.toList());
        this.businessId = bmsBusinessTask.getBusinessId();
    }

    public String getGuid()
    {
        return guid;
    }

    public void setId(String guid)
    {
        this.guid = guid;
    }

    public String getLabel()
    {
        return label;
    }

    public void setLabel(String label)
    {
        this.label = label;
    }

    public List<TreeSelectExport> getChildren()
    {
        return children;
    }

    public void setChildren(List<TreeSelectExport> children)
    {
        this.children = children;
    }

	public double getSort() {
		return sort;
	}

	public void setSort(double sort) {
		this.sort = sort;
	}

	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}
}
